# Copyright 2017 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the &quot;License&quot;);
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#     http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an &quot;AS IS&quot; BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

# NOTE: This class is auto generated by the swagger code generator program.
# https://github.com/swagger-api/swagger-codegen.git
# Do not edit the class manually.

defmodule GoogleApi.Spectrum.V1explorer.Model.DeviceValidity do
  @moduledoc """
  The device validity element describes whether a particular device is valid to operate in the regulatory domain.

  ## Attributes

  - deviceDesc (DeviceDescriptor): The descriptor of the device for which the validity check was requested. It will always be present. Defaults to: `null`.
  - isValid (boolean()): The validity status: true if the device is valid for operation, false otherwise. It will always be present. Defaults to: `null`.
  - reason (String.t): If the device identifier is not valid, the database may include a reason. The reason may be in any language. The length of the value should not exceed 128 characters. Defaults to: `null`.
  """

  use GoogleApi.Gax.ModelBase

  @type t :: %__MODULE__{
          :deviceDesc => GoogleApi.Spectrum.V1explorer.Model.DeviceDescriptor.t(),
          :isValid => any(),
          :reason => any()
        }

  field(:deviceDesc, as: GoogleApi.Spectrum.V1explorer.Model.DeviceDescriptor)
  field(:isValid)
  field(:reason)
end

defimpl Poison.Decoder, for: GoogleApi.Spectrum.V1explorer.Model.DeviceValidity do
  def decode(value, options) do
    GoogleApi.Spectrum.V1explorer.Model.DeviceValidity.decode(value, options)
  end
end

defimpl Poison.Encoder, for: GoogleApi.Spectrum.V1explorer.Model.DeviceValidity do
  def encode(value, options) do
    GoogleApi.Gax.ModelBase.encode(value, options)
  end
end
